#pragma once
#include "Common/ConfigDefine.h"

enum DBFLUSH_NAME 
{
    DBFLUSH_DBNAME_GROUP = 0,
    DBFLUSH_DBNAME_ZONE = 1,
    DBFLUSH_DBNAME_ACCOUNT = 2,
};

struct DB_FLUSH_START_PARAM 
{
    uint32_t           groupId;
    DBFLUSH_NAME       dbName;
    MYSQL_SERVER_PARAM mysqlParam;
    REDIS_SERVER_PARAM redisParam;
    DB_FLUSH_START_PARAM() 
	{
        groupId = 0;
        dbName = DBFLUSH_DBNAME_GROUP;
    }
};

enum DB_FLUSH_EVENT_TYPE 
{
	DB_FLUSH_UPDATE_CHARACTER_DATA,
	DB_FLUSH_DELETE_CHARACTER_DATA,
    DB_FLUSH_UPDATE_DATA,
    DB_FLUSH_EVENT_COUNT
};

enum DBFLUSH_UPDATE_STATE 
{
    UPDATE_STATE_UNSET  = 0,
    UPDATE_STATE_SETED  = 1,
    UPDATE_STATE_DELETE = 2,
};

struct EVENT_DATA 
{
    uint64_t id;
    DB_FLUSH_EVENT_TYPE type;
};
